package per.destiny.seckill.exception;

import lombok.Data;
import lombok.NoArgsConstructor;
import per.destiny.seckill.vo.RespBeanEnum;

@Data
@NoArgsConstructor
public class GlobalException extends RuntimeException {

    private RespBeanEnum respBeanEnum;

    public GlobalException(RespBeanEnum respBeanEnum) {
        // 设置异常信息
        super(respBeanEnum.getMessage());
        this.respBeanEnum = respBeanEnum;
    }
}
